<!--
 * @Author: lihaogn
 * @Date: 2021-12-17 10:27:12
 * @LastEditTime: 2021-12-17 10:48:07
 * @LastEditor: lihaogn
 * @Description: 测试 attrs 的传递情况
 * @FilePath: \lix-vue2-demo\src\views\experiment\vue-test\modules\AttrsTest.vue
-->
<template>
  <div>
    <AttrsSonTest v-bind="$attrs" v-on="$listeners" @click="handleClick" />
  </div>
</template>

<script>
import AttrsSonTest from './AttrsSonTest.vue'
export default {
  components: { AttrsSonTest },
  created() {
    console.log('created attrs', this.$attrs, 'listener', this.$listeners)
  },
  mounted() {
    console.log('mounted attrs', this.$attrs, 'listener', this.$listeners)
  },
  methods: {
    handleClick() {
      console.log('attrs click 响应了')
      this.$emit('ok')
    }
  }
}
</script>

<style lang="less" scoped></style>
